Remove PyGithub from PEX, replace with stdlib urllib#249
Open
gibsondan wants to merge 1 commit into
Open
Conversation
|
Your pull request is automatically being deployed to Dagster Cloud.
|
099d7a6 to
c2979a3
Compare
The PEX only used PyGithub for two small scripts (fetch_github_avatar.py and create_or_update_comment.py). Rewriting them against requests (which is already a transitive dep in the PEX) drops PyGithub and gives us automatic retry on transient 5xx/429 via urllib3 Retry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c2979a3 to
5122ffe
Compare
shalabhc
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PyGithubdependency from the dagster-cloud PEX build inscripts/release.py.src/fetch_github_avatar.pyandsrc/create_or_update_comment.pyto call the GitHub REST API directly viaurllib.request(paginated comment lookup preserved, anonymous-commit safety added).Both call sites only used a tiny slice of PyGithub, so stdlib was a cleaner swap than pulling in another GitHub client. Result: smaller PEX, one fewer transitive dependency.
Replaces #248 (rebased onto a clean branch).
Test plan
update_dagster_cloud_pex) and confirm it no longer ships thegithubpackage.fetch_github_avatar.py(prints empty line).🤖 Generated with Claude Code